package com.swing.gui.pages.lock;

import base.JPanelBase;

import javax.swing.*;
import java.awt.*;

/**
 * @author Yuang, Gongming
 * @date 2022-01-25 14:15
 */
public class Two extends JPanel implements JPanelBase {

    private static Two two;

    public JLabel a;

    public static Two init() {
        if (two == null) {
            synchronized (Two.class) {
                if (two == null) {
                    two = new Two();
                    try {
                        two.css();
                        two.planning();
                        two.event();
                    } catch (Exception e) {
                        throw new RuntimeException(Two.class.getSimpleName() + "实例化失败！");
                    }

                }
            }
        }
        return two;
    }

    @Override
    public void css() {
//        two.setLayout(new BorderLayout());
        two.setBackground(Color.LIGHT_GRAY);
    }

    @Override
    public void planning() {
        JLabel test = new JLabel("two - 需要输入凭证来完成解锁");
        test.setHorizontalAlignment(SwingConstants.CENTER);
        two.add(test);

    }

    @Override
    public void event() {

    }
}
